<template>
  <div class="container">
    <div class="nav">
      <div class="nav-left">
        <i class="iconfont icon-arrowLeft arrow" @click="$router.back()"></i>
      </div>
      <div class="nav-middle">
        <slot></slot>
      </div>
      <div class="nav-right">
        <slot name="iconfont-right"></slot>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "MyNavHead",
};
</script>

<style scoped lang="less">
.container {
  width: 100%;
  .nav {
    display: flex;
    align-items: center;
    width: 100%;
    height: 1.2rem;
    margin-bottom: 1.2rem;
    background-color: #ff5654;
    position: fixed;
    top: 0;
    z-index: 999;
    .nav-left {
      width: 15%;
      .arrow {
        color: #fff;
        font-size: 23px;
        position: absolute;
        left: 0.3rem;
        top: 0.3rem;
      }
    }
    .nav-right {
      width: 15%;
    }
    .nav-middle {
      color: #fff;
      letter-spacing: 1px;
      flex: 1;
    }
  }
}
</style>